#ifndef QCURVETOOL_H
#define QCURVETOOL_H

#include <QGraphicsItem>
#include <QVector>
#include <QPointF>
#include "qmytool.h"

class QCurveTool : public QMyTool
{
    Q_OBJECT
public:
    explicit QCurveTool(QObject *parent = 0);
    ~QCurveTool();
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent * contextMenuEvent);
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * mouseEvent );
private:
    QGraphicsPathItem *operating;
    QVector<QGraphicsRectItem*> Points;
    QVector<QGraphicsEllipseItem*>ControlPoints;
    QVector<QGraphicsLineItem*> ControlLines;
    bool isAddingPoint;
    bool isMovingPoint;
    bool isMovingCPoint;
    QPointF point1;
    QPointF point2;
    QGraphicsPathItem *currentPath;
    int path_index_temp;
    int index_temp;
signals:
    
public slots:
    
};

#endif // QCURVETOOL_H
